VBA Loop through recordset

183

VBA Loop through recordset -

'The short version
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Contacts")
If Not (rs.EOF And rs.BOF) Then
	Do Until rs.EOF = True
		rs.MoveNext
	Loop
End If
rs.Close
Set rs = Nothing

Comments

Submit
0 Comments